Skip to content

Conversation

@garyzhang99
Copy link
Collaborator

Description

The workflow don't support training from base model since we are using self.model.chat instead of self.model.generate; This PR should enable training from base model.

Checklist

Please check the following items before code is ready to be reviewed.

  • Code has passed all tests
  • Docstrings have been added/updated in Google Style
  • Documentation has been updated
  • Code is ready for review

@garyzhang99 garyzhang99 requested a review from pan-x-c May 21, 2025 07:17
@yanxi-chen
Copy link
Collaborator

I'd recommend deleting the newly defined tokenize_text(_async) methods, if they are not really used elsewhere and irrelevant to the goal of this PR as stated in the description.

messages.append({"role": "assistant", "content": self.reply_prefix})
return messages

def format_prompt(self):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a new workflow named BaseModelWorkflow may be better.

# for unpaired preference dataset
label_key: str = ""

use_base_format: bool = False
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using a new workflow type can do the same thing. Don't add a new field here.

@garyzhang99
Copy link
Collaborator Author

The corresponding changes will the addressed in another PR. Close this PR for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants